<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <title>请选择在浏览器中打开</title>
</head>
<body>
<style type="text/css">
    .wxtip{background: rgba(0,0,0,0.8); text-align: center; position: fixed; left:0; top: 0; width: 100%; height: 100%; z-index: 998; display: none;}
    .wxtip-icon{width: 83px; height: 83px; background: url(img/img_199759.png) no-repeat; display: block; position: absolute; right: 20px; top: 20px;}
    .wxtip-txt{margin-top: 107px; color: #fff; font-size: 16px; line-height: 1.5;}
</style>
<div class="test">
    <a href="#" id="JdownApp">点击下载APP</a>
    <div class="wxtip" id="JweixinTip">
        <span class="wxtip-icon"></span>
        <p class="wxtip-txt">点击右上角<br/>选择在浏览器中打开</p>
    </div>
</div>
<script type="text/javascript">
    function weixinTip(ele){
        var ua = navigator.userAgent;
        var isWeixin = !!/MicroMessenger/i.test(ua);
        if(isWeixin){
            ele.onclick=function(e){
                window.event? window.event.returnValue = false : e.preventDefault();
                document.getElementById('JweixinTip').style.display='block';
            }
            document.getElementById('JweixinTip').onclick=function(){
                this.style.display='none';
            }
        }else{
            var myDate = new Date();
            var m = myDate.getMonth();       //获取当前月份(0-11,0代表1月)
            var d = myDate.getDate();        //获取当前日(1-31)
        }
    }
    var btn1 = document.getElementById('JdownApp');//下载一
    weixinTip(btn1);

</script>
</body>
</html>